﻿<cfsilent>
	<cfscript>
	
		propertyAdvice = getProperty("serviceFactory").getBean("studentPropertyAdvice");
		
		event.setArg("pageTitle", "大学外语等级考试 - 打印成绩证明");
		
		currentTab = event.getArg("TabID", "labStudentScroll");
		
		studentId= event.getArg("STU");
		
		passArgs = structNew();
		
		sql = "SELECT 
				t_student.stu_id, t_student.stu_name, 
				scroll_id, scroll, listening, reading, writing, integration, absent, 
				t_cet.exam_name 
				FROM t_cet_scroll 
				INNER JOIN t_student ON t_cet_scroll.stu_id = t_student.stu_id 
				INNER JOIN t_cet ON t_cet.exam_id = t_cet_scroll.exam_id 
				WHERE 
					t_student.stu_id = :studentId 
				ORDER BY 
					scroll_id ";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );

		rs_scroll = queryObj.execute( sql=sql ).getResult();
		
	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('DEFAULT_EVENT')#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">大学外语等级考试</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 application"></i>打印学生成绩证明
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labStudentScroll">class="active"</cfif> id="labStudentScroll" tabTarget="StudentScroll">学生等级考试成绩</span>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>
				</script>
				
				<div id="StudentScroll" class="tabContent">
					
					<cfif rs_scroll.recordCount >

						<div class="noticeBlock">
							<p><span class="img icon16x16 message"></span>下列是学号<em><cfoutput>#rs_scroll.stu_id#</cfoutput> </em>学生姓名<em><cfoutput>#rs_scroll.stu_name#</cfoutput></em>没有缺考记录的等级考试成绩.</p>
							<hr/>
						</div>

						<cfset row = 0 />
						<table class="UIEditable">
							<thead>
								<tr>
									<td width="20"></td>
									<td width="150">准考证号</td>
									<td>考试科目</td>
									<td width="80">总分</td>
									<td width="50">听力</td>
									<td width="50">阅读</td>
									<td width="50">写作</td>
									<td width="50">综合</td>
									<td width="20"></td>
									<!---<td width="20"></td>--->
								</tr>
							</thead>
							<tbody>
								<cfloop query="rs_scroll">
							
									<cfset structInsert(passArgs, "SID", rs_scroll.scroll_id, true) />
							
									<cfset row ++ />
							
									<tr class="editRows">
									    <td class="index"><cfoutput>#row#</cfoutput></td>
										<td><span class="numeric"><cfoutput>#rs_scroll.scroll_id#</cfoutput></span></td>
										<td><cfoutput>#rs_scroll.exam_name#</cfoutput></td>
										
										<cfif rs_scroll.absent eq "1">
												<td colspan="5">缺考</td>
											<cfelse>
												<td><span class="numeric"><cfoutput>#rs_scroll.scroll#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_scroll.listening#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_scroll.reading#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_scroll.writing#</cfoutput></span></td>
												<td><span class="numeric"><cfoutput>#rs_scroll.integration#</cfoutput></span></td>
										</cfif>
										
										<cfif rs_scroll.absent eq "0">
											<td><a title="打印成绩证明" target="_blank"  href="<cfoutput>#buildURL('resultsProvePrint', passArgs)#</cfoutput>"><i class="mrs img btnPrint"></i></a></td>
											<!---<td><a title="成绩替代" class="operation" href="<cfoutput>#buildURL('cetReplace', passArgs)#</cfoutput>"></a></td>--->
										</cfif>
									</tr>
									
								</cfloop>
						    </tbody>
						</table>
						<cfelse>
							<div class="systemNotice">
								<h3>没有搜索到该学生的成绩记录</h3>
							</div>
					</cfif>
					
				</div>
           
			</div>
		</li>
	</ul>
</div>



